//
//  SearchBarController.h
//  CMS
//
//  Created by Vuong Van Khanh on 12/18/12.
//  Copyright (c) 2012 Rikkei. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface SearchBarController : UITableViewController <UISearchBarDelegate, UITextFieldDelegate>
{
    UISearchBar *searchBar;
    UISearchDisplayController *searchDisplayResult;
    
    NSArray			*listContent;			// The master content.
	NSMutableArray	*filteredListContent;	// The content filtered as a result of a search.
	
	// The saved state of the search UI if a memory warning removed the view.
    NSString		*savedSearchTerm;
    NSInteger		savedScopeButtonIndex;
    BOOL			searchWasActive;
}
@property (nonatomic, retain)IBOutlet UISearchBar *searchBar;
@property (nonatomic, retain)IBOutlet UISearchDisplayController *searchDisplayResult;

@property (nonatomic, retain) NSArray *listContent;
@property (nonatomic, retain) NSMutableArray *filteredListContent;

@property (nonatomic, copy) NSString *savedSearchTerm;
@property (nonatomic) NSInteger savedScopeButtonIndex;
@property (nonatomic) BOOL searchWasActive;

@end
